<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>location</title>
	<style>
		*{
			padding: 0;
			margin: 0;
		}
		ul,li{
			list-style: none;
		}
		.fix{
			position: fixed;
			left: 10px;
			top: 30%;
		}
		.fix li{
			width: 35px;
			height: 30px;
			text-align: center;
			line-height: 30px;
			margin-bottom: 5px;
			background-color: #ccc;
		}
		.div{
			width: 1200px;
			height: 600px;
			margin: 20px auto;
			background-color: #ddd;
			font-size: 50px;
			text-align: center;
			line-height: 400px;
		}
	</style>
	
</head>
<body>
	<ul class="fix">
		<li onclick="go('#div1')">1F</li>
		<li onclick="go('#div2')">2F</li>
		<li onclick="go('#div3')">3F</li>
		<li onclick="go('#div4')">4F</li>
		<li onclick="go('#div5')">5F</li>
	</ul>
	<div class="div" id="div1">这是一楼</div>
	<div class="div" id="div2">这是二楼</div>
	<div class="div" id="div3">这是三楼</div>
	<div class="div" id="div4">这是四楼</div>
	<div class="div" id="div5">这是五楼</div>
</body>
<script>
	function go(s){
		location.hash = s; 
	}
</script>
</html>